%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Masters/Doctoral Thesis 
% LaTeX Template
% Version 1.41 (9/9/13)
%
% This template has been downloaded from:
% http://www.latextemplates.com
%
% Original authors:
% Steven Gunn 
% http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/
% and
% Sunil Patel
% http://www.sunilpatel.co.uk/thesis-template/
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Note:
% Make sure to edit document variables in the Thesis.cls file
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[12pt, a4paper, twoside]{Thesis} % Paper size, default font size and one-sided paper

\graphicspath{{Pictures/}} % Specifies the directory where pictures are stored

\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the natbib reference package - read up on this to edit the reference style; if you want text (e.g. Smith et al., 2012) for the in-text references (instead of numbers), remove 'numbers' 
\hypersetup{urlcolor=black, colorlinks=false} % Colors hyperlinks in blue - change to black if annoying
\title{\ttitle} % Defines the thesis title - don't touch this

\usepackage{amsmath}
\usepackage{microtype}	% Font improvement for pdflatex.
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{verbatim}
\usepackage{url}
\usepackage{float}					% Floating figure placement.
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{makeidx}

%\usepackage{IEEEtrantools}

% Listings for wrapping code.
\lstset{breaklines=true, basicstyle=\footnotesize\ttfamily, tabsize=4, numbers=left, stepnumber=1, frame=single, showstringspaces=false}
% Use this before inserting C++ code snippet using lstlisting.
\lstset{language=[ISO]C++, commentstyle=\color{green!50!black}, keywordstyle=\color{blue}, stringstyle=\color{red!60!black}}
% Use this before inserting Matlab code.
\lstset{language=Matlab, commentstyle=\color{green!50!black}, keywordstyle=\color{blue}, stringstyle=\color{red!60!black}}

% Links direct to top of figures.
\usepackage[all]{hypcap}

% Index directive.
\makeindex

% Line spacing.
\def\SingleSpacing{\def\baselinestretch{1}\large\normalsize}
\def\DoubleSpacing{\def\baselinestretch{1.5}\large\normalsize}

\tikzstyle{decision} = [diamond, draw, fill=yellow!20, 
    text width=5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20, 
    text width=20em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em]
    
\let\Chaptermark\chaptermark
\def\chaptermark#1{\def\Chaptername{#1}\Chaptermark{#1}}
\let\Sectionmark\sectionmark
\def\sectionmark#1{\def\Sectionname{#1}\Sectionmark{#1}}

\setlength{\oddsidemargin}{1.5in}
\setlength{\evensidemargin}{1.5in}

\begin{document}

\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages

\setstretch{1.5} % Line spacing of 1.3

% Define the page headers using the FancyHdr package and set up for one-sided printing
\fancyhead{} % Clears all page headers and footers
\rhead{\thepage} % Sets the right side header to show the page number
\lhead{} % Clears the left side page header

\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % New command to make the lines in the title page

% PDF meta-data
\hypersetup{pdftitle={\ttitle}}
\hypersetup{pdfsubject=\subjectname}
\hypersetup{pdfauthor=\authornames}
\hypersetup{pdfkeywords=\keywordnames}

%----------------------------------------------------------------------------------------
%	TITLE PAGE
%----------------------------------------------------------------------------------------

% Title page

\begin{titlepage}
\begin{center}

\textsc{\LARGE \univname}\\[0.5cm] % University name
% Project title.
\rule{\linewidth}{0.5mm}\\[0.3cm]
{\Large \bfseries \ttitle}\\
\rule{\linewidth}{0.5mm}\\[0.5cm]

{\large By}\\[0.2cm]
{\large \bfseries \ M. Junaid Nasir}\\[1.5cm]


{\large Supervised By}\\[0.2cm]
{\large \bfseries \ Engr. Attique Dawood}\\[1.9cm]


\includegraphics[scale=0.15]{Figures/NU_Logo.png}\\[0.8cm]

{\large \bfseries Department of Electrical Engineering}\\[0.2cm]
{\large \bfseries NUCES--FAST}\\[0.2cm]
{\large \bfseries ISLAMABAD, PAKISTAN}\\[0.2cm]
{\large \bfseries \today}

\end{center}
\end{titlepage}


%----------------------------------------------------------------------------------------
%	Developer's Submission
%----------------------------------------------------------------------------------------

\begin{center}


{\large This report is being submitted to the Department of Electrical Engineering of the National University of Computer and Emerging Sciences in partial fulfillment of the requirements for the degree of BS in Electrical Engineering}\\[0.5cm]
\end{center}


%----------------------------------------------------------------------------------------
%	DECLARATION PAGE
%----------------------------------------------------------------------------------------

\clearpage


\vspace*{-4cm}
\setstretch{1.2}

\Declaration{
\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics
I take full responsibility of the project work conducted during the Final Year Project (FYP) titled { \bfseries \emph{``\ttitle''}}. I solemnly declare that the project work presented in the FYP report is done solely by me with no significant help from any other person; however, small help wherever taken is duly acknowledged.  I have also written the complete FYP report by myself. Moreover, I have not presented this FYP (or substantially similar project work) or any part of the thesis previously to any other degree awarding institution within Pakistan or abroad.

I understand that the management of Department of Electrical Engineering of National University of Computer and Emerging Sciences has a zero tolerance policy towards plagiarism. Therefore, I as an author of the above-mentioned FYP report solemnly declare that no portion of this report has been plagiarized and any material used in the report from other sources is properly referenced. Moreover, the report does not contain any literal citing of more than 70 words (total) even by giving a reference unless I have obtained the written permission of the publisher to do so. Furthermore, the work presented in the report is my own work and I have positively cited the related work of the other projects by clearly differentiating my work from their relevant work.

I further understand that if I am found guilty of any form of plagiarism in my FYP report even after my graduation, the University reserves the right to withdraw my BS degree.  Moreover, the University will also have the right to publish my name on its website that keeps a record of the students who committed plagiarism in their FYP reports.”
\begin{flushright}
\rule{5cm}{0.2mm}\\
M. Junaid Nasir (10-0361)\\[0.8cm]
\rule{5cm}{0.2mm}\\
\hspace{1.8cm}
Certified by Supervisor\\[0.8cm]
\rule{5cm}{0.2mm}\\
Verified by Plagiarism Cell Officer\\[0.5cm]
Dated:~\rule{4.5cm}{0.2mm}\\[0.2cm]
\end{flushright}
}

\clearpage % Start a new page


%----------------------------------------------------------------------------------------
%	ABSTRACT PAGE
%----------------------------------------------------------------------------------------
%\vspace{3.5cm}
\addtotoc{Abstract} % Add the "Abstract" page entry to the Contents
\setstretch{1.5}
\abstract{\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics

Negative Index Materials (NIM) is a hot research area having several
applications for example SuperLense, Fiber optics, RADAR systems, and Invisibility clocking. 
However, to model these applications using NIM is not an easy task, it requires complex algorithms
and considerable amount of time to simulate these objects. The aim of this project
is to provide a platform for future research in this field by implementing Finite Difference Time Domain (FDTD)
 algorithm for NIM and optimizing the program for less computational time using Graphics Process Unit (GPU).
In this project a NIM slab is modeled using the (frequency dependent dispersive) Drude model that have 
 refractive index of -1 (choosing $\mu_{r} = -1$ and $\epsilon_{r} = -1$ ) at 3 GHz

}

\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------

\setstretch{1.5} % Reset the line-spacing to 1.3 for body text (if it has changed)

\acknowledgements{\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics

I owe particular thanks to my supervisor Mr. Attique Dawood for the continuous support during my project, for his  motivation, enthusiasm, and immense knowledge. His guidance helped me in all the time of FYP and writing of this thesis. I also take this opportunity to express a deep sense of gratitude to my co-supervisor Ms. Hina Ashraf, for her cordial support, valuable information and guidance. Her willingness to motivate me contributed tremendously to this project.

}
\clearpage % Start a new page

%----------------------------------------------------------------------------------------
%	LIST OF CONTENTS/FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------

\pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back

\lhead{\emph{Table of Contents}} % Set the left side page header to "Contents"
\tableofcontents % Write out the Table of Contents

\lhead{\emph{List of Figures}} % Set the left side page header to "List of Figures"
\listoffigures % Write out the List of Figures

%\lhead{\emph{List of Tables}} % Set the left side page header to "List of Tables"
%\listoftables % Write out the List of Tables

%----------------------------------------------------------------------------------------
%	ABBREVIATIONS
%----------------------------------------------------------------------------------------

\clearpage % Start a new page

\setstretch{1.5} % Set the line spacing to 1.5, this makes the following tables easier to read

\lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations"
\listofsymbols{ll} % Include a list of Abbreviations (a table of two columns)
{
\textbf{NIM} & \textbf{N}egtive \textbf{I}ndex \textbf{M}aterial \\
\textbf{LHM} & \textbf{L}eft \textbf{H}anded \textbf{M}aterial \\
\textbf{DNG} & \textbf{D}ouble \textbf{N}e\textbf{G}ative (Material) \\
\textbf{EM} & \textbf{E}lectrico\textbf{M}agnetic\\
\textbf{FDTD} & \textbf{F}inite \textbf{D}ifference \textbf{T}ime \textbf{D}omain \\
\textbf{GPU} & \textbf{G}raphical \textbf{P}rocessing \textbf{U}nit \\
\textbf{OpenCL} & Open \textbf{C}omputing \textbf{L}anguage \\
\textbf{AMD} & \textbf{A}dvance \textbf{M}icro \textbf{D}evices \\
\textbf{PMC} & \textbf{P}erfect \textbf{M}agnetic \textbf{C}onductor \\
\textbf{ABC} & \textbf{A}bsorbing \textbf{B}oundary \textbf{C}ondition \\
%\textbf{Acronym} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or \\
}

%----------------------------------------------------------------------------------------
%	PHYSICAL CONSTANTS/OTHER DEFINITIONS
%----------------------------------------------------------------------------------------

%\clearpage % Start a new page

%\lhead{\emph{Physical Constants}} % Set the left side page header to "Physical Constants"

%\listofconstants{lrcl} % Include a list of Physical Constants (a four column table)
%{
%Speed of Light & $c$ & $=$ & $2.997\ 924\ 58\times10^{8}\ \mbox{ms}^{-\mbox{s}}$ (exact)\\
% Constant Name & Symbol & = & Constant Value (with units) \\
%}


%----------------------------------------------------------------------------------------
%	THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------
\mainmatter % Begin numeric (1,2,3...) page numbering

\pagestyle{fancy} % Return the page headers back to the "fancy" style
\fancyhead{} % Clears all page headers and footers
%\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
%\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
\lhead{}
\rhead{}
\fancyhead[RO]{\thechapter\hfill\thepage}
\fancyhead[LE]{\thepage\hfill\Sectionmark}
% Include the chapters of the thesis as separate files from the Chapters folder
% Uncomment the lines as you write the chapters

\input{Chapters/Chapter1}
\input{Chapters/Chapter2} 
\input{Chapters/Chapter3}
%\input{Chapters/Chapter4} 
%\input{Chapters/Chapter5} 
%\input{Chapters/Chapter6} 
%\input{Chapters/Chapter7} 

%----------------------------------------------------------------------------------------
%	THESIS CONTENT - APPENDICES
%----------------------------------------------------------------------------------------

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices

% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices

\input{Appendices/AppendixA}
\input{Appendices/AppendixB}
%\input{Appendices/AppendixC}

\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics

\backmatter

%----------------------------------------------------------------------------------------
%	BIBLIOGRAPHY
%----------------------------------------------------------------------------------------

\label{Bibliography}

\lhead{\emph{Bibliography}} % Change the page header to say "Bibliography"

\bibliographystyle{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography

\bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"

%----------------------------------------------------------------------------------------
%	Index
%----------------------------------------------------------------------------------------

\clearpage % Start a new page
\label{Index}
\addtotoc{Index}
\printindex

\end{document}